<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>    
<div class="container-fluid top-nav">
    <div class="container">
        <div class="row">
            <div class="col2">
                <img src="${pageContext.request.contextPath}/images/logo.png" alt="八维帖吧" style="width: 80px">
            </div>
            <div class="col8 menu">
                <ul style="display: flex">
                    <li><a href="${pageContext.request.contextPath}/index">首页</a></li>
                    <li><a href="${pageContext.request.contextPath}/users">最新用户</a></li>
                    <li><a href="${pageContext.request.contextPath}/my/publishTopic">我要发贴</a></li>
                    <li><form class="search">
                        <input type="text" name="key" placeholder="关键词">
                        <button class="btn btn-success">搜索</button>
                    </form></li>
                </ul>
            </div>
            <div class="col2">
                <p style="height: 50px;line-height: 50px;">
                  <c:choose>
                   <c:when test="${sessionScope.LOGIN_USER==null}">
                             <a class="light" href="${pageContext.request.contextPath}/login">登录</a> &nbsp;&nbsp;&nbsp;&nbsp;
                            <a class="light" href="${pageContext.request.contextPath}/register">注册</a>
                   </c:when>
                   <c:otherwise>
                      <a href="${pageContext.request.contextPath}/my/index">${sessionScope.LOGIN_USER.userName}</a> &nbsp;[<a href="${pageContext.request.contextPath}/logout">退出</a>]
                   </c:otherwise>
                  </c:choose>
                </p>
            </div>
            
        </div>
    </div>
</div>
    